package org.developer.study.springboot.controller;

import org.apache.log4j.Logger;
import org.developer.study.springboot.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 主要的controller类
 * Created by Administrator on 2017/1/25.
 */
@RestController
public class SecurityController {
    private static Logger logger = Logger.getLogger(SecurityController.class);
    @Autowired
    private DemoService demoService;

    @RequestMapping("/user/demo-return-data")
    String demoReturnData() {
        logger.info("/demo-teturn-data access");
        return "helloworld";  //return back json data
    }
    @RequestMapping("/login")
    String login() {
        logger.info("/login");
        return "login";  //return back json data
    }

    @RequestMapping("/index")
    String index() {
        logger.info("/index");
        return "index";  //return back json data
    }

}
